package ca.scotthyndman.as2haxe.dom;

import org.eclipse.jface.text.Region;

/**
 * Adds line information to a region.
 */
public class ASRegion extends Region {

	private int line;

	private int numberOfLines;

	public ASRegion(int offset, int length, int line, int numLines) {
		super(offset, length);

		this.setLine(line);
		this.setNumberOfLines(numLines);
	}

	public void setLine(int line) {
		this.line = line;
	}

	public int getLine() {
		return line;
	}

	public void setNumberOfLines(int numberOfLines) {
		this.numberOfLines = numberOfLines;
	}

	public int getNumberOfLines() {
		return numberOfLines;
	}

	@Override
	public Object clone() {
		return new ASRegion(getOffset(), getLength(), getLine(),
				getNumberOfLines());
	}

}
